#pragma once

enum Error_code { success, fail, range_error, underflow, overflow, fatal, not_present, duplicate_error, entry_inserted, entry_found, internet_error };

const int MAX_QUEUE = 10;

template<typename Queue_entry>
class Queue
{
public:
	Queue();
	Error_code append(const Queue_entry& item);
	Error_code serve();
	Error_code retrieve(Queue_entry& item)const;
	bool empty()const;
	int size()const;
	void clear();
	bool full()const;
	Error_code serve_and_retrieve(Queue_entry& item);
private:
	int front, rear;
	int count;
	Queue_entry entry[MAX_QUEUE];
};
